<?php
include 'int.php';

if (isset($_POST["photo"]) && $_POST["photo"]!=""){		
	if ($stmt = $mysqlpdo->prepare("UPDATE join_game g SET g.photo=? WHERE g.session=?")) {
		$stmt->bindParam(1, $_POST["photo"], PDO::PARAM_INT);
		$stmt->bindParam(2, $_COOKIE["login_session"], PDO::PARAM_STR);
		$stmt->execute();
		if ($stmt->rowCount()==0){
			echo "error";
			exit();
		}
	}
}

?>